3.11.31 \(\int \sec ^4(e+f x) (a+a \sin (e+f x))^m (A+B \sin (e+f x)) \, dx\) [1031]

Optimal. Leaf size=135 \[ \frac {B \sec ^3(e+f x) (a+a \sin (e+f x))^m}{f (3-m)}+\frac {2^{-\frac {3}{2}+m} (A (3-m)-B m) \, _2F_1\left (-\frac {3}{2},\frac {5}{2}-m;-\frac {1}{2};\frac {1}{2} (1-\sin (e+f x))\right ) \sec ^3(e+f x) (1+\sin (e+f x))^{\frac {1}{2}-m} (a+a \sin (e+f x))^{1+m}}{3 a f (3-m)} \]

[Out]

B*sec(f*x+e)^3*(a+a*sin(f*x+e))^m/f/(3-m)+1/3*2^(-3/2+m)*(A*(3-m)-B*m)*hypergeom([-3/2, 5/2-m],[-1/2],1/2-1/2*
sin(f*x+e))*sec(f*x+e)^3*(1+sin(f*x+e))^(1/2-m)*(a+a*sin(f*x+e))^(1+m)/a/f/(3-m)

________________________________________________________________________________________

Rubi [A]
time = 0.13, antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {2939, 2768, 72, 71} \begin {gather*} \frac {2^{m-\frac {3}{2}} (A (3-m)-B m) \sec ^3(e+f x) (\sin (e+f x)+1)^{\frac {1}{2}-m} (a \sin (e+f x)+a)^{m+1} \, _2F_1\left (-\frac {3}{2},\frac {5}{2}-m;-\frac {1}{2};\frac {1}{2} (1-\sin (e+f x))\right )}{3 a f (3-m)}+\frac {B \sec ^3(e+f x) (a \sin (e+f x)+a)^m}{f (3-m)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]^4*(a + a*Sin[e + f*x])^m*(A + B*Sin[e + f*x]),x]

[Out]

(B*Sec[e + f*x]^3*(a + a*Sin[e + f*x])^m)/(f*(3 - m)) + (2^(-3/2 + m)*(A*(3 - m) - B*m)*Hypergeometric2F1[-3/2
, 5/2 - m, -1/2, (1 - Sin[e + f*x])/2]*Sec[e + f*x]^3*(1 + Sin[e + f*x])^(1/2 - m)*(a + a*Sin[e + f*x])^(1 + m
))/(3*a*f*(3 - m))

Rule 71

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)/(b*(m + 1)*(b/(b*c
 - a*d))^n))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m, n}
, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] ||  !(Ra
tionalQ[n] && GtQ[-d/(b*c - a*d), 0]))

Rule 72

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Dist[(c + d*x)^FracPart[n]/((b/(b*c - a*d)
)^IntPart[n]*(b*((c + d*x)/(b*c - a*d)))^FracPart[n]), Int[(a + b*x)^m*Simp[b*(c/(b*c - a*d)) + b*d*(x/(b*c -
a*d)), x]^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] &&  !IntegerQ[n] &&
(RationalQ[m] ||  !SimplerQ[n + 1, m + 1])

Rule 2768

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[a^2*(
(g*Cos[e + f*x])^(p + 1)/(f*g*(a + b*Sin[e + f*x])^((p + 1)/2)*(a - b*Sin[e + f*x])^((p + 1)/2))), Subst[Int[(
a + b*x)^(m + (p - 1)/2)*(a - b*x)^((p - 1)/2), x], x, Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, g, m, p}, x] &&
 EqQ[a^2 - b^2, 0] &&  !IntegerQ[m]

Rule 2939

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.)
 + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(f*g*(m + p + 1))), x
] + Dist[(a*d*m + b*c*(m + p + 1))/(b*(m + p + 1)), Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^m, x], x] /; F
reeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && NeQ[m + p + 1, 0]

Rubi steps

\begin {align*} \int \sec ^4(e+f x) (a+a \sin (e+f x))^m (A+B \sin (e+f x)) \, dx &=\frac {B \sec ^3(e+f x) (a+a \sin (e+f x))^m}{f (3-m)}+\left (A-\frac {B m}{3-m}\right ) \int \sec ^4(e+f x) (a+a \sin (e+f x))^m \, dx\\ &=\frac {B \sec ^3(e+f x) (a+a \sin (e+f x))^m}{f (3-m)}+\frac {\left (a^2 \left (A-\frac {B m}{3-m}\right ) \sec ^3(e+f x) (a-a \sin (e+f x))^{3/2} (a+a \sin (e+f x))^{3/2}\right ) \text {Subst}\left (\int \frac {(a+a x)^{-\frac {5}{2}+m}}{(a-a x)^{5/2}} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {B \sec ^3(e+f x) (a+a \sin (e+f x))^m}{f (3-m)}+\frac {\left (2^{-\frac {5}{2}+m} \left (A-\frac {B m}{3-m}\right ) \sec ^3(e+f x) (a-a \sin (e+f x))^{3/2} (a+a \sin (e+f x))^{1+m} \left (\frac {a+a \sin (e+f x)}{a}\right )^{\frac {1}{2}-m}\right ) \text {Subst}\left (\int \frac {\left (\frac {1}{2}+\frac {x}{2}\right )^{-\frac {5}{2}+m}}{(a-a x)^{5/2}} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {B \sec ^3(e+f x) (a+a \sin (e+f x))^m}{f (3-m)}+\frac {2^{-\frac {3}{2}+m} \left (A-\frac {B m}{3-m}\right ) \, _2F_1\left (-\frac {3}{2},\frac {5}{2}-m;-\frac {1}{2};\frac {1}{2} (1-\sin (e+f x))\right ) \sec ^3(e+f x) (1+\sin (e+f x))^{\frac {1}{2}-m} (a+a \sin (e+f x))^{1+m}}{3 a f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [F]
time = 1.46, size = 0, normalized size = 0.00 \begin {gather*} \int \sec ^4(e+f x) (a+a \sin (e+f x))^m (A+B \sin (e+f x)) \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Integrate[Sec[e + f*x]^4*(a + a*Sin[e + f*x])^m*(A + B*Sin[e + f*x]),x]

[Out]

Integrate[Sec[e + f*x]^4*(a + a*Sin[e + f*x])^m*(A + B*Sin[e + f*x]), x]

________________________________________________________________________________________

Maple [F]
time = 0.15, size = 0, normalized size = 0.00 \[\int \left (\sec ^{4}\left (f x +e \right )\right ) \left (a +a \sin \left (f x +e \right )\right )^{m} \left (A +B \sin \left (f x +e \right )\right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)^4*(a+a*sin(f*x+e))^m*(A+B*sin(f*x+e)),x)

[Out]

int(sec(f*x+e)^4*(a+a*sin(f*x+e))^m*(A+B*sin(f*x+e)),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(a+a*sin(f*x+e))^m*(A+B*sin(f*x+e)),x, algorithm="maxima")

[Out]

integrate((B*sin(f*x + e) + A)*(a*sin(f*x + e) + a)^m*sec(f*x + e)^4, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(a+a*sin(f*x+e))^m*(A+B*sin(f*x+e)),x, algorithm="fricas")

[Out]

integral((B*sec(f*x + e)^4*sin(f*x + e) + A*sec(f*x + e)^4)*(a*sin(f*x + e) + a)^m, x)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)**4*(a+a*sin(f*x+e))**m*(A+B*sin(f*x+e)),x)

[Out]

Exception raised: SystemError >> excessive stack use: stack is 3006 deep

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(a+a*sin(f*x+e))^m*(A+B*sin(f*x+e)),x, algorithm="giac")

[Out]

integrate((B*sin(f*x + e) + A)*(a*sin(f*x + e) + a)^m*sec(f*x + e)^4, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (A+B\,\sin \left (e+f\,x\right )\right )\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m}{{\cos \left (e+f\,x\right )}^4} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*sin(e + f*x))*(a + a*sin(e + f*x))^m)/cos(e + f*x)^4,x)

[Out]

int(((A + B*sin(e + f*x))*(a + a*sin(e + f*x))^m)/cos(e + f*x)^4, x)

________________________________________________________________________________________